<h1><?php echo dl_lang_general("main.heroes_create"); ?></h1>

<?php 
setMessages();
if (!isset($data["formCreateHero"])) 
    $data["formCreateHero"] = array(); 
?>

<form method='post' action='' name='createHeroForm' enctype="multipart/form-data">
    <input type='hidden' name='xfunction' value='xCreateHero'>
    <input type="hidden" name="MAX_FILE_SIZE" value="5000000">
    <table align='center' cellpadding="2">
        <tr>
            <th><?php echo dl_lang_general("form.name"); ?></th>
            <td><?php echo form_text("name", $data["formCreateHero"], 30, 20); ?></td>
        </tr>
        <tr>
            <th><?php echo dl_lang_general("form.race"); ?></th>
            <td><?php echo form_select("race", getInum("RACE"),$data["formCreateHero"]); ?></td>
        </tr>
        <tr>
            <th><?php echo dl_lang_general("form.sex"); ?></th>
            <td><?php echo form_select("sex", getInum("SEX"),$data["formCreateHero"]); ?></td>
        </tr>
        <tr>
            <th><?php echo dl_lang_general("form.avatar"); ?></th>
            <td><input type="file" name="avatar"></td>
        </tr>
    </table>
    
    <table align='center'>
        <tr>
            <td><input type="checkbox" name="agree"></td>
            <td><?php echo dl_lang_general("form.hero_agreement")." ".html_href("faq", dl_lang_general("form.hero_agreement2")); ?></td>
        </tr>
    </table>
    
    <br />
    
    <center>
        <button onclick='createHeroForm.submit();'><?php echo dl_lang_general("form.create_hero"); ?></button>
    </center>
</form>

<?php
unset($data["formCreateHero"]);
?>